package com.legal.aid.app.mapper;

import com.legal.aid.app.domain.vo.CommonUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface AppUserMapper {
    CommonUserVo selectCommonUserById(Long userId);

    CommonUserVo getUserVoById(@Param("userId") String userId);
    
    /**
     * 更新用户头像
     * @param userId 用户ID
     * @param avatarUrl 头像URL
     * @return 影响行数
     */
    int updateUserAvatar(@Param("userId") String userId, @Param("avatarUrl") String avatarUrl);

    int deductWalletBalance(@Param("amount") Double amount, @Param("userId") Long userId);


    List<CommonUserVo> getUserVoByIds(@Param("list") List<Long> userIds);
}
